#ifndef SL_EXCEPTION_HPP
#define SL_EXCEPTION_HPP

// std Header
#include <string>
#include <sstream>
#include <exception>

// Eigene Header
#include "Code.hpp"
#include "../Manager/ManagerTemplate.hpp"

namespace sl
{
	namespace tmp
	{
		class ExceptionT
		{
		public:
			ExceptionT(sl::ErrorCode code, const std::string& filename, const long linenumber);
			ExceptionT(const std::string& text, sl::ErrorCode code, const std::string& filename, const long linenumber);
			
		private:
			std::string myMessage;
			sl::ErrorCode myErrorCode;
			std::string myFilename;
			long myLinenumber;

		public:
			std::string GetMessage();
			sl::ErrorCode GetErrorCode();
			std::string GetFilename();
			long GetLinenumber();

		public:
			std::string what();
		};
	}

	#define Exception(text, code) tmp::ExceptionT((text), (code), __FILE__, __LINE__)
}

#endif //SL_EXCEPTION_HPP